﻿@model FTBS.Models.Entities.User
@{
    ViewBag.Title = "Thay đổi thông tin";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<style>
    .text-box {
        background: white;
        border: 1px solid #ffa853;
        box-shadow: 0 0 1px 1px #ffa853;
        color: #666;
        outline: none;
        height: 23px;
        width: 275px;
    }

    #Gender {
        background: white;
        border: 1px solid #ffa853;
        box-shadow: 0 0 1px 1px #ffa853;
        color: #666;
        outline: none;
    }
</style>

<div style="background-color: white; width: 100%; min-height: 511px">
    <table style="background-color: white">
        <tr style="vertical-align: top">
            <td style="max-width: 400px">
                @Html.Partial("~/Views/Shared/_CustomerMenu.cshtml")
            </td>
            <td>
                <h2 style="font-weight: bold; text-align: center">Thay đổi thông tin tài khoản</h2>
                @using (Html.BeginForm("EditCustomerAccount", "Customer", FormMethod.Post))
                {
                    @Html.ValidationSummary(true)
                    @Html.HiddenFor(model => model.UserName)
                    @Html.HiddenFor(model => model.Password)
                    <div>

                        <table class="table border" style="margin: 0px 0px 0px 30px; text-align: left; background-color: lightyellow; max-width: 650px">
                            <tr>
                                <th>Tên tài khoản 
                                </th>
                                <td style="font-weight: bold">
                                    @Html.DisplayFor(model => model.UserName)
                                </td>
                            </tr>
                            <tr>
                                <th>Họ tên (*)
                                </th>
                                <td>
                                    <div class="input-control text" style="">
                                        @Html.EditorFor(model => model.FullName)
                                        <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.FullName)</p>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <th>Giới tính
                                </th>
                                <td>
                                    <div class="input-control select">

                                        @Html.DropDownListFor(model => model.Gender, (SelectList)ViewBag.Gender)
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <th>Tuổi
                                </th>
                                <td>
                                    <div class="input-control text">
                                        @Html.EditorFor(model => model.Age)
                                        <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.Age)</p>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <th>Địa chỉ (*)
                                </th>
                                <td>
                                    <div class="input-control text">
                                        @Html.EditorFor(model => model.Address)
                                        <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.Address)</p>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <th>Email (*)
                                </th>
                                <td>
                                    <div class="input-control text">
                                        @Html.EditorFor(model => model.Email)
                                        <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.Email)</p>
                                        @if (ViewBag.Email != null)
                                        { 
                                            <p style="color: red; font-size: 10pt">Email này đã được sử dụng!</p>
                                        }
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <th>Số điện thoại (*)
                                </th>
                                <td>
                                    <div class="input-control text">
                                        @Html.EditorFor(model => model.PhoneNumber)
                                        <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.PhoneNumber)</p>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" style="text-align: center">
                                    <button class="metro button1" type="submit">Thay đổi</button>
                                </td>
                            </tr>
                        </table>
                    </div>
                }
            </td>
        </tr>
    </table>
</div>

<style>
    .metro .button1 {
        -moz-box-shadow: 3px 4px 0px 0px #899599;
        -webkit-box-shadow: 3px 4px 0px 0px #899599;
        box-shadow: 3px 4px 0px 0px #899599;
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #bab1ba));
        background: -moz-linear-gradient(top, #ededed 5%, #bab1ba 100%);
        background: -webkit-linear-gradient(top, #ededed 5%, #bab1ba 100%);
        background: -o-linear-gradient(top, #ededed 5%, #bab1ba 100%);
        background: -ms-linear-gradient(top, #ededed 5%, #bab1ba 100%);
        background: linear-gradient(to bottom, #ededed 5%, #bab1ba 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#bab1ba',GradientType=0);
        background-color: #ededed;
        -moz-border-radius: 15px;
        -webkit-border-radius: 15px;
        border-radius: 15px;
        border: 1px solid #d6bcd6;
        display: inline-block;
        cursor: pointer;
        color: #3a8a9e;
        font-family: arial;
        font-size: 15px;
        padding: 0px 18px;
        text-decoration: none;
        text-shadow: 0px 1px 0px #e1e2ed;
    }

        .metro .button1:hover {
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #bab1ba), color-stop(1, #ededed));
            background: -moz-linear-gradient(top, #bab1ba 5%, #ededed 100%);
            background: -webkit-linear-gradient(top, #bab1ba 5%, #ededed 100%);
            background: -o-linear-gradient(top, #bab1ba 5%, #ededed 100%);
            background: -ms-linear-gradient(top, #bab1ba 5%, #ededed 100%);
            background: linear-gradient(to bottom, #bab1ba 5%, #ededed 100%);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#bab1ba', endColorstr='#ededed',GradientType=0);
            background-color: #bab1ba;
        }

        .metro .button1:active {
            position: relative;
            top: 1px;
        }
</style>
